package com.fly.system.service.impl;

import com.fly.common.model.SysUserModel;
import com.fly.system.mapper.SysUserMapper;
import com.fly.system.service.LoginService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @CLASSNAME: LoginServiceImpl
 * @author: Fly
 * 日期: 2020/6/7  18:00
 * 描述:
 **/
@Service
public class LoginServiceImpl implements LoginService {

    Logger logger = LoggerFactory.getLogger(LoginServiceImpl.class);
    
    @Autowired
    private SysUserMapper userMapper;

    @Override
    public SysUserModel duLogin(String loginName) {
    	SysUserModel user = new SysUserModel();
		user.setLoginName(loginName);
		return userMapper.selectOne(user);
    }


	@Override
	public SysUserModel findUserByName(String userName) {
		SysUserModel user = new SysUserModel();
		user.setUserName(userName);
		return userMapper.selectOne(user);
	}
}
